<script setup lang="ts">
import {useBase64Img,useInitReq} from '@/hooks'

useBase64Img({el:'#baseImg'}).then(res => {
  console.log(res)
})

const {data}=useInitReq()

console.log(data,'>>>>>')
</script>

<template>
<div>
  <img id="baseImg" src="@/assets/lazyLoadImages/img.png" alt="">
  <br>
  <span>name:{{data[0]?.name}}</span>
</div>
</template>

<style scoped lang="scss">
#baseImg{
  width:200px;
  height:300px;
}
</style>
